package rad.framework.mda.generator.template.test.resources;

public class JmsBeans
{
  protected static String nl;
  public static synchronized JmsBeans create(String lineSeparator)
  {
    nl = lineSeparator;
    JmsBeans result = new JmsBeans();
    nl = null;
    return result;
  }

  public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
  protected final String TEXT_1 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + NL + "" + NL + "<deployment xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" + NL + "            xsi:schemaLocation=\"urn:jboss:bean-deployer bean-deployer_1_0.xsd\"" + NL + "            xmlns=\"urn:jboss:bean-deployer\">" + NL + "   <bean name=\"jboss.mq:service=JMSProviderLoader,name=JMSProvider\" class=\"org.jboss.jms.jndi.JNDIProviderAdapter\">" + NL + "      <property name=\"factoryRef\">java:/JmsXA</property>" + NL + "      <property name=\"queueFactoryRef\">java:/JmsXA</property>" + NL + "      <property name=\"topicFactoryRef\">java:/JmsXA</property>" + NL + "      <property name=\"properties\" class=\"java.util.Properties\">" + NL + "               <map keyClass=\"java.lang.String\" valueClass=\"java.lang.String\">" + NL + "                  <entry>" + NL + "                     <key>java.naming.factory.initial</key>" + NL + "                     <value>org.jnp.interfaces.LocalOnlyContextFactory</value>" + NL + "                  </entry>" + NL + "                  <entry>" + NL + "                      <key>java.naming.factory.url.pkgs</key>" + NL + "                      <value>org.jboss.naming:org.jnp.interfaces</value>" + NL + "                  </entry>" + NL + "               </map>" + NL + "      </property>" + NL + "   </bean>" + NL + "" + NL + "   <bean name=\"b1\" class=\"org.jboss.ejb3.embedded.JndiBinder\">" + NL + "      <property name=\"jndiProperties\"><inject bean=\"InitialContextProperties\"/></property>" + NL + "      <property name=\"target\"><inject bean=\"jboss.mq:service=JMSProviderLoader,name=JMSProvider\"/></property>" + NL + "      <property name=\"bindTo\">java:/DefaultJMSProvider</property>" + NL + "      <property name=\"serializable\">true</property>" + NL + "   </bean>" + NL + "" + NL + "   <bean name=\"jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool\" class=\"org.jboss.jms.asf.StdServerSessionPoolFactory\">" + NL + "      <property name=\"name\">StdJMSPool</property>" + NL + "      <property name=\"xidFactory\"><inject bean=\"XidFactoryMBean\"/></property>" + NL + "      <property name=\"transactionManager\"><inject bean=\"TransactionManager\"/></property>" + NL + "   </bean>" + NL + "" + NL + "   <bean name=\"b2\" class=\"org.jboss.ejb3.embedded.JndiBinder\">" + NL + "      <property name=\"jndiProperties\"><inject bean=\"InitialContextProperties\"/></property>" + NL + "      <property name=\"target\"><inject bean=\"jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool\"/></property>" + NL + "      <property name=\"bindTo\">java:/StdJMSPool</property>" + NL + "      <property name=\"serializable\">false</property>" + NL + "   </bean>" + NL + "" + NL + "" + NL + "   <bean name=\"jboss.mq:service=PersistenceManager\" class=\"org.jboss.mq.kernel.JDBC2PersistenceManager\">" + NL + "      <property name=\"transactionManager\">" + NL + "         <inject bean=\"TransactionManager\"/>" + NL + "      </property>" + NL + "      <property name=\"datasource\">" + NL + "         <inject bean=\"DefaultDS\"/>" + NL + "      </property>" + NL + "      <property name=\"sqlProperties\">" + NL + "" + NL + "            BLOB_TYPE=OBJECT_BLOB" + NL + "            INSERT_TX = INSERT INTO JMS_TRANSACTIONS (TXID) values(?)" + NL + "            INSERT_MESSAGE = INSERT INTO JMS_MESSAGES (MESSAGEID, DESTINATION, MESSAGEBLOB, TXID, TXOP) VALUES(?,?,?,?,?)" + NL + "            SELECT_ALL_UNCOMMITED_TXS = SELECT TXID FROM JMS_TRANSACTIONS" + NL + "            SELECT_MAX_TX = SELECT MAX(TXID) FROM JMS_MESSAGES" + NL + "            SELECT_MESSAGES_IN_DEST = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE DESTINATION=?" + NL + "            SELECT_MESSAGE = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?" + NL + "            MARK_MESSAGE = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE MESSAGEID=? AND DESTINATION=?" + NL + "            UPDATE_MESSAGE = UPDATE JMS_MESSAGES SET MESSAGEBLOB=? WHERE MESSAGEID=? AND DESTINATION=?" + NL + "            UPDATE_MARKED_MESSAGES = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=?" + NL + "            UPDATE_MARKED_MESSAGES_WITH_TX = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=? AND TXID=?" + NL + "            DELETE_MARKED_MESSAGES_WITH_TX = DELETE FROM JMS_MESSAGES WHERE TXOP=? AND JMS_MESSAGES.TXID IN (SELECT TXID FROM JMS_TRANSACTIONS)" + NL + "            DELETE_TX = DELETE FROM JMS_TRANSACTIONS WHERE TXID = ?" + NL + "            DELETE_MARKED_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXID=? AND TXOP=?" + NL + "            DELETE_MESSAGE = DELETE FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?" + NL + "            CREATE_MESSAGE_TABLE = CREATE CACHED TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT NULL, \\" + NL + "               DESTINATION VARCHAR(255) NOT NULL, TXID INTEGER, TXOP CHAR(1), \\" + NL + "               MESSAGEBLOB OBJECT, PRIMARY KEY (MESSAGEID, DESTINATION) )" + NL + "            CREATE_IDX_MESSAGE_TXOP_TXID = CREATE INDEX JMS_MESSAGES_TXOP_TXID ON JMS_MESSAGES (TXOP, TXID)" + NL + "            CREATE_IDX_MESSAGE_DESTINATION = CREATE INDEX JMS_MESSAGES_DESTINATION ON JMS_MESSAGES (DESTINATION)" + NL + "            CREATE_TX_TABLE = CREATE CACHED TABLE JMS_TRANSACTIONS ( TXID INTEGER, PRIMARY KEY (TXID) )" + NL + "            CREATE_TABLES_ON_STARTUP = TRUE" + NL + "            DELETE_TEMPORARY_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXOP='T'" + NL + "" + NL + "      </property>" + NL + "   </bean>" + NL + "" + NL + "   <bean name=\"jboss.mq:service=MessageCache\" class=\"org.jboss.mq.kernel.MessageCache\">" + NL + "      <property name=\"persistenceManager\"><inject bean=\"jboss.mq:service=PersistenceManager\"/></property>" + NL + "      <property name=\"highMemoryMark\">50</property>" + NL + "      <property name=\"maxMemoryMark\">60</property>" + NL + "   </bean>" + NL + "" + NL + "   <bean name=\"jboss.mq:service=StateManager\" class=\"org.jboss.mq.kernel.JDBCStateManager\">" + NL + "      <property name=\"transactionManager\">" + NL + "         <inject bean=\"TransactionManager\"/>" + NL + "      </property>" + NL + "      <property name=\"datasource\">" + NL + "         <inject bean=\"DefaultDS\"/>" + NL + "      </property>" + NL + "      <property name=\"sqlProperties\">" + NL + "" + NL + "            CREATE_TABLES_ON_STARTUP = TRUE" + NL + "            CREATE_USER_TABLE = CREATE TABLE JMS_USERS (USERID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, \\" + NL + "                                                       CLIENTID VARCHAR(128), PRIMARY KEY(USERID))" + NL + "            CREATE_ROLE_TABLE = CREATE TABLE JMS_ROLES (ROLEID VARCHAR(32) NOT NULL, USERID VARCHAR(32) NOT NULL, \\" + NL + "                                                       PRIMARY KEY(USERID, ROLEID))" + NL + "            CREATE_SUBSCRIPTION_TABLE = CREATE TABLE JMS_SUBSCRIPTIONS (CLIENTID VARCHAR(128) NOT NULL, \\" + NL + "                                                       SUBNAME VARCHAR(128) NOT NULL, TOPIC VARCHAR(255) NOT NULL, \\" + NL + "                                                       SELECTOR VARCHAR(255), PRIMARY KEY(CLIENTID, SUBNAME))" + NL + "            GET_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?" + NL + "            LOCK_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?" + NL + "            GET_SUBSCRIPTIONS_FOR_TOPIC = SELECT CLIENTID, SUBNAME, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE TOPIC=?" + NL + "            INSERT_SUBSCRIPTION = INSERT INTO JMS_SUBSCRIPTIONS (CLIENTID, SUBNAME, TOPIC, SELECTOR) VALUES(?,?,?,?)" + NL + "            UPDATE_SUBSCRIPTION = UPDATE JMS_SUBSCRIPTIONS SET TOPIC=?, SELECTOR=? WHERE CLIENTID=? AND SUBNAME=?" + NL + "            REMOVE_SUBSCRIPTION = DELETE FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?" + NL + "            GET_USER_BY_CLIENTID = SELECT USERID, PASSWD, CLIENTID FROM JMS_USERS WHERE CLIENTID=?" + NL + "            GET_USER = SELECT PASSWD, CLIENTID FROM JMS_USERS WHERE USERID=?" + NL + "            POPULATE.TABLES.01 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('guest', 'guest')" + NL + "            POPULATE.TABLES.02 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('j2ee', 'j2ee')" + NL + "            POPULATE.TABLES.03 = INSERT INTO JMS_USERS (USERID, PASSWD, CLIENTID) VALUES ('john', 'needle', 'DurableSubscriberExample')" + NL + "            POPULATE.TABLES.04 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('nobody', 'nobody')" + NL + "            POPULATE.TABLES.05 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('dynsub', 'dynsub')" + NL + "            POPULATE.TABLES.06 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('guest','guest')" + NL + "            POPULATE.TABLES.07 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('j2ee','guest')" + NL + "            POPULATE.TABLES.08 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('john','guest')" + NL + "            POPULATE.TABLES.09 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('subscriber','john')" + NL + "            POPULATE.TABLES.10 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','john')" + NL + "            POPULATE.TABLES.11 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','dynsub')" + NL + "            POPULATE.TABLES.12 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','john')" + NL + "            POPULATE.TABLES.13 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','dynsub')" + NL + "            POPULATE.TABLES.14 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('noacc','nobody')" + NL + "" + NL + "      </property>" + NL + "   </bean>" + NL + "" + NL + "" + NL + "   <bean name=\"BasicQueueParameters\" class=\"org.jboss.mq.server.BasicQueueParameters\"/>" + NL + "" + NL + "   <bean name=\"jboss.mq:service=ThreadPool\" class=\"org.jboss.util.threadpool.BasicThreadPool\">" + NL + "      <property name=\"name\">JMSThread</property>" + NL + "      <property name=\"threadGroupName\">JBossMQ Server Threads</property>" + NL + "      <!-- The max number of threads in the pool -->" + NL + "      <property name=\"maximumPoolSize\">10</property>" + NL + "      <!-- The max number of tasks before the queue is full -->" + NL + "      <property name=\"maximumQueueSize\">1000</property>" + NL + "      <!-- The behavior of the pool when a task is added and the queue is full." + NL + "      abort - a RuntimeException is thrown" + NL + "      run - the calling thread executes the task" + NL + "      wait - the calling thread blocks until the queue has room" + NL + "      discard - the task is silently discarded without being run" + NL + "      discardOldest - check to see if a task is about to complete and enque" + NL + "         the new task if possible, else run the task in the calling thread" + NL + "      -->" + NL + "      <property name=\"blockingModeString\">run</property>" + NL + "   </bean>" + NL + "" + NL + "   <bean name=\"jboss.mq:service=DestinationManager\" class=\"org.jboss.mq.server.JMSDestinationManager\">" + NL + "      <constructor>" + NL + "         <parameter class=\"org.jboss.mq.server.BasicQueueParameters\">" + NL + "            <inject bean=\"BasicQueueParameters\"/>" + NL + "         </parameter>" + NL + "      </constructor>" + NL + "      <property name=\"persistenceManager\"><inject bean=\"jboss.mq:service=PersistenceManager\"/></property>" + NL + "      <property name=\"messageCache\"><inject bean=\"jboss.mq:service=MessageCache\"/></property>" + NL + "      <property name=\"stateManager\"><inject bean=\"jboss.mq:service=StateManager\"/></property>" + NL + "      <property name=\"threadPool\"><inject bean=\"jboss.mq:service=ThreadPool\"/></property>" + NL + "      <property name=\"threadGroup\"><inject bean=\"jboss.mq:service=ThreadPool\" property=\"threadGroup\"/></property>" + NL + "      <start method=\"startServer\"/>" + NL + "      <stop method=\"stopServer\"/>" + NL + "   </bean>" + NL + "" + NL + "   <bean name=\"jboss.mq.destination:service=Queue,name=DLQ\" class=\"org.jboss.mq.kernel.Queue\">" + NL + "     <property name=\"destinationManagerPojo\"><inject bean=\"jboss.mq:service=DestinationManager\"/></property>" + NL + "     <property name=\"initialContextProperties\"><inject bean=\"InitialContextProperties\"/></property>" + NL + "      <property name=\"destinationName\">DLQ</property>" + NL + "   </bean>" + NL + "" + NL + "   <bean name=\"jboss.mq:service=Invoker\" class=\"org.jboss.mq.server.JMSServerInvoker\">" + NL + "      <property name=\"next\"><inject bean=\"jboss.mq:service=DestinationManager\"/></property>" + NL + "   </bean>" + NL + "" + NL + "   <bean name=\"jboss.mq:service=InvocationLayer,type=JVM\" class=\"org.jboss.mq.kernel.JVMIL\">" + NL + "      <property name=\"jmsInvoker\"><inject bean=\"jboss.mq:service=Invoker\"/></property>" + NL + "     <property name=\"connectionFactoryJNDIRef\">java:/ConnectionFactory</property>" + NL + "     <property name=\"xAConnectionFactoryJNDIRef\">java:/JmsXA</property>" + NL + "     <property name=\"pingPeriod\">0</property>" + NL + "      <property name=\"initialContextProperties\"><inject bean=\"InitialContextProperties\"/></property>" + NL + "   </bean>" + NL + "" + NL + "   <bean name=\"jboss.mq.destination:service=Topic,name=EventTopic\" class=\"org.jboss.mq.kernel.Topic\">" + NL + "     <property name=\"destinationManagerPojo\"><inject bean=\"jboss.mq:service=DestinationManager\"/></property>" + NL + "     <property name=\"initialContextProperties\"><inject bean=\"InitialContextProperties\"/></property>" + NL + "      <property name=\"destinationName\">rad.framework.EventTopic</property>" + NL + "      <property name=\"redeliveryDelay\">2000</property>" + NL + "      <property name=\"redeliveryLimit\">3</property>" + NL + "   </bean>" + NL + "" + NL + "   <bean name=\"jboss.mq.destination:service=Queue,name=RequestQueue\" class=\"org.jboss.mq.kernel.Queue\">" + NL + "     <property name=\"destinationManagerPojo\"><inject bean=\"jboss.mq:service=DestinationManager\"/></property>" + NL + "     <property name=\"initialContextProperties\"><inject bean=\"InitialContextProperties\"/></property>" + NL + "      <property name=\"destinationName\">rad.framework.RequestQueue</property>" + NL + "      <property name=\"redeliveryDelay\">2000</property>" + NL + "      <property name=\"redeliveryLimit\">3</property>" + NL + "   </bean>" + NL + "" + NL + "</deployment>";

  public String generate(Object argument)
  {
    final StringBuffer stringBuffer = new StringBuffer();
    

    stringBuffer.append(TEXT_1);
    return stringBuffer.toString();
  }
}
